﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WmsApp.StaticData
{
    public static class BillTypeTranslate
    {
        public static string GetInStoreTypeDescByCode(string inStoreTypeCode)
        {
            var list = StaticData.StaticObjects.GetInStoreTypes();
            var q = from o in list
                    where o.InStoreCode == inStoreTypeCode
                    select o;
            var inStoreType = q.FirstOrDefault();
            if (inStoreType == null)
                return "";
            return inStoreType.InStoreName;
        }

        public static string GetOutStoreTypeDescByCode(string outStoreTypeCode)
        {
            var list = StaticData.StaticObjects.GetOutStoreTypes();
            var q = from o in list
                    where o.OutStoreCode == outStoreTypeCode
                    select o;
            var outStoreType = q.FirstOrDefault();
            if (outStoreType == null)
                return "";
            return outStoreType.OutStoreName;
        }

    }
}
